import type { Camera } from "three";
import { keyWordCode } from "../typescript/enum";

/**
 * 设置 HTML 元素尺寸
 * @param element 
 * @param opt 
 */
export const setElementSize = (
  element: HTMLElement,
  opt: { width: number; height: number }
) => {
  element.style.width = opt.width + 'px'
  element.style.height = opt.height + 'px'
}

/** 执行操作 */
export const doSth = () => {

}

/**
 * 获取相机位置信息
 * @param camera 
 * @returns 
 */
export const getCaremaPositionText = (camera: Camera) => {
  if (camera) {
    return `Carema: (${camera.position.x},${camera.position.y},${camera.position.z})`
  }
  return ''
}